<?php
	class OrderteamWidget extends Widget{
		public function render($data){
			import('ORG.Util.Page');
			$count = M()->query("select count(*) num from team t,teaminstructors ti where ti.InstructorId={$data['data']} and ti.TeamId=t.Id");
			$Page = new Page($count[0]['num'],2);
			$show = $Page->show();
			$data['team'] = M()->query("select t.Id,t.Name,t.Logo,t.SchoolName from team t,teaminstructors ti where ti.InstructorId={$data['data']} and ti.TeamId=t.Id");
			$data['page'] = $show; 
			$content = $this->renderFile('Orderteam',$data);
			return $content;
		}

	}








?>